package filter;
import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import javax.servlet.DispatcherType;

import entity.User;


@WebFilter(filterName="error",value= {"/404.jsp"},dispatcherTypes= {DispatcherType.ERROR})
public class Error implements Filter{
	
	@Override
	public void destroy() {
//		System.out.println("start...run...errorPage...destroy");
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
//		System.out.println("start...run...errorPage...doFilter");
		chain.doFilter(request, response);
//		System.out.println("end...run...errorPage...doFilter");
	}

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		System.out.println("start...run...errorPage...init");
	}
}

